Optimal. Leaf size=47 \[ \frac {-B+i A}{2 d (a+i a \tan (c+d x))}+\frac {x (A-i B)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {3526, 8} \[ \frac {-B+i A}{2 d (a+i a \tan (c+d x))}+\frac {x (A-i B)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3526
Rubi steps
\begin {align*} \int \frac {A+B \tan (c+d x)}{a+i a \tan (c+d x)} \, dx &=\frac {i A-B}{2 d (a+i a \tan (c+d x))}+\frac {(A-i B) \int 1 \, dx}{2 a}\\ &=\frac {(A-i B) x}{2 a}+\frac {i A-B}{2 d (a+i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.55, size = 102, normalized size = 2.17 \[ \frac {\cos (c+d x) (A+B \tan (c+d x)) ((A (2 d x-i)-2 i B d x+B) \tan (c+d x)-2 i A d x+A+B (-2 d x+i))}{4 a d (\tan (c+d x)-i) (A \cos (c+d x)+B \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.56, size = 42, normalized size = 0.89 \[ \frac {{\left (2 \, {\left (A - i \, B\right )} d x e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A - B\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{4 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.29, size = 85, normalized size = 1.81 \[ -\frac {\frac {{\left (i \, A + B\right )} \log \left (\tan \left (d x + c\right ) - i\right )}{a} + \frac {{\left (-i \, A - B\right )} \log \left (-i \, \tan \left (d x + c\right ) + 1\right )}{a} + \frac {-i \, A \tan \left (d x + c\right ) - B \tan \left (d x + c\right ) - 3 \, A - i \, B}{a {\left (\tan \left (d x + c\right ) - i\right )}}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.20, size = 121, normalized size = 2.57 \[ \frac {B \ln \left (\tan \left (d x +c \right )+i\right )}{4 d a}+\frac {i A \ln \left (\tan \left (d x +c \right )+i\right )}{4 d a}+\frac {A}{2 d a \left (\tan \left (d x +c \right )-i\right )}+\frac {i B}{2 d a \left (\tan \left (d x +c \right )-i\right )}-\frac {i \ln \left (\tan \left (d x +c \right )-i\right ) A}{4 d a}-\frac {\ln \left (\tan \left (d x +c \right )-i\right ) B}{4 d a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.17, size = 45, normalized size = 0.96 \[ \frac {-\frac {B}{2\,a}+\frac {A\,1{}\mathrm {i}}{2\,a}}{d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}-\frac {x\,\left (B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.26, size = 90, normalized size = 1.91 \[ \begin {cases} - \frac {\left (- i A + B\right ) e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text {for}\: 4 a d e^{2 i c} \neq 0 \\x \left (- \frac {A - i B}{2 a} + \frac {\left (A e^{2 i c} + A - i B e^{2 i c} + i B\right ) e^{- 2 i c}}{2 a}\right ) & \text {otherwise} \end {cases} - \frac {x \left (- A + i B\right )}{2 a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________